//
//  XQTextFieldView.swift
//  XQSwiftUIDemo
//
//  Created by sinking on 2019/11/17.
//  Copyright © 2019 WXQ. All rights reserved.
//

import SwiftUI

struct XQTextFieldView: View {
    
    @State var text = ""
    
    var body: some View {
        VStack {
            TextField("请输入", text: $text, onEditingChanged: { (result) in
                print("onEditingChanged: \(result ? "开始编辑" : "结束编辑")")
            }) {
                print("点击了Retrun:\(self.text)")
            }
            
        }
    }
}

struct XQTextFieldView_Previews: PreviewProvider {
    static var previews: some View {
        XQTextFieldView()
    }
}
